<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link href="../css/mui.min.css" rel="stylesheet" />
</head>
<body>
	<header class="mui-bar mui-bar-nav">
	    <h1 class="mui-title">博客</h1>
	    	    		      		      <a class="mui-icon mui-action-menu mui-icon-help mui-pull-right" href=""></a>
	</header>
	<div class="mui-content container">
      <div class="form-signin">
        <h2 class="form-signin-heading"></h2>
        <label for="inputEmail" class="sr-only">Email address</label>
        <input type="email" id="inputEmail" class="form-control" placeholder="邮箱/手机号" required="" autofocus="">
        <label for="inputUsername" class="sr-only">Username</label>
        <input type="text" id="inputUsername" class="form-control" placeholder="昵称" required="">
        <label for="inputPassword" class="sr-only">password</label>
        <input type="password" id="inputPassword" class="form-control" placeholder="设置密码" required="" autofocus="">
        <label for="confirmPassword" class="sr-only">confirmPassword</label>
        <input type="password" id="confirmPassword" class="form-control" placeholder="确认密码" required="">        
        <div class="checkbox">
          <label>
            <input type="checkbox" value="remember-me"> Remember me
          </label>
        </div>
        <button class="btn btn-lg btn-block" onclick="rg()">注册</button>
        <button class="btn"" onclick="location='../index.html'">登陆</button>
      </div>

    </div>
</body>
<script>
    function rg(){
        var email = document.getElementById("inputEmail").value;
        var username = document.getElementById("inputUsername").value;
        var password = document.getElementById("inputPassword").value;
        var confirmPassword = document.getElementById("confirmPassword").value;

        if(password==confirmPassword){
        window.localStorage.setItem("email",email);
        window.localStorage.setItem("username",username);
        window.localStorage.setItem("password",password);
        alert("注册成功");
        window.location.href="../index.html";
        }


    }
</script>
</html>